import request from '@/utils/request.js';
import { userTokenStore } from '@/stores/token.js';  

//司机列表查询
export const driverListService = (params)=>{
    const tokenStore = userTokenStore();
    const token = tokenStore.token;
    const requestConfig = {
        params:params,
        headers:{
            'token':token
        }
    };
    return request.get('/drivers',requestConfig);
};

//车辆列表查询
export const carListService = (params)=>{
    const tokenStore = userTokenStore();
    const token = tokenStore.token;
    const requestConfig = {
        params:params,
        headers:{
            'token':token
        }
    };
    return request.get('/cars',requestConfig)
}